import request from '@/router/axios';

export const getList = (page, size, params) => {
  return request({
    url: '/order/sellerOrderAfterSaleService/list',
    method: 'post',
    params: {
      ...params,
      page,
      size,
    }
  })
}
export const approveAfterSale = (data) => {
  return request({
    url: '/order/sellerOrderAfterSaleService/approveAfterSale',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: data
  })
}

export const confirmReceiving = (afterSaleId) => {
  return request({
    url: '/order/sellerOrderAfterSaleService/confirmReceiving',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {afterSaleId}
  })
}

export const delayReceiving = (afterSaleId) => {
  return request({
    url: '/order/sellerOrderAfterSaleService/delayReceiving',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {afterSaleId}
  })
}

export const serviceDetail = (id) => {
  return request({
    url: '/order/sellerOrderAfterSaleService/detail',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {
      id
    }
  })
}
export const cancelService = (afterSaleId) => {
  return request({
    url: '/order/sellerOrderAfterSaleService/cancel',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: {
      afterSaleId
    }
  })
}
export const getOrderGoodsDetail = (data) => {
  return request({
    url: '/order/sellerOrderFormGoods/detail',
    method: 'post',
    meta: {
      isSerialize: true,
    },
    data: data
  })
}